<?php
    $HoTen = $_POST['HoTen'];
    $NgaySinh = $_POST['NgaySinh'];
    $DiaChi = $_POST['DiaChi'];
    $Email = $_POST['Email'];
    $SoDienThoai = $_POST['SoDienThoai'];
    $TenDangNhap = $_POST['TenDangNhap'];
    $MatKhau = $_POST['MatKhau'];
    $XacNhanMatKhau = $_POST['XacNhanMatKhau'];
    $QuyenHan = $_POST['QuyenHan'];
    
    $nguoidung = new nguoidungbs();
    
    $nguoidung->HoTen = $HoTen;
    $nguoidung->NgaySinh = $NgaySinh;
    $nguoidung->DiaChi = $DiaChi;
    $nguoidung->Email = $Email;
    $nguoidung->SoDienThoai = $SoDienThoai;
    $nguoidung->TenDangNhap = $TenDangNhap;
    $nguoidung->MatKhau = md5($MatKhau);
    $nguoidung->QuyenHan = $QuyenHan;
    
    if($nguoidung->Add())
        header("Location: index.php?do=danhsach_nguoidung");
    else
        echo "Không thể thêm người dùng!";
?>